{% macro book_nav_section(section_path, section_number) %}
{% set section = get_section(path=section_path) %}
<li class="book-nav-section">
    <a href="{{ section.permalink }}" {% if current_path == section.path %}class="book-nav-section-title-active book-nav-section-title" {% else %}class="book-nav-section-title"{% endif %}>
        <strong class="book-nav-section-number">{{ section_number }}.</strong>
        {{ section.title | lower }}
    </a>
    {% if section.subsections %}
    <ul class="book-nav-sections book-nav-sections-indented">
        {% for s in section.subsections %}
        {% set subsection_number = section_number ~ "." ~ loop.index %}
        {{ book_macros::book_nav_section(section_path=s, section_number=subsection_number) }}
        {% endfor %}
    </ul>
    {% endif %}
</li>
{% endmacro book_nav_section %}
